#include <iostream>
#include "sub/test.h"
#include "sub/quesion1.h"
#include "sub/quesion7.h"
#include "sub/quesion9.h"
#include "sub/quesion13.h"
#include "sub/quesion14.h"
#include "sub/quesion20.h"
#include "sub/quesion26.h"
#include "sub/quesion27.h"
#include "sub/quesion28.h"
#include "sub/quesion35.h"
#include "sub/quesion38.h"
#include "sub/quesion53.h"
#include "sub/quesion58.h"
#include "sub/quesion66.h"
#include <vector>
#include <cstring>

using namespace std;

int main()
{
/* test
    cout << "Hello World!" << endl;
    test bzc;
    cout<<bzc.sum(10,11)<<endl;
*/
/* 两数之和 1
    quesion1 que1;
    vector<int> b;
    vector<int> r;
    b={1,2,3,4};
    r=que1.twoSum(b,4);
    cout<<r[0]<<endl;
    cout<<r[1]<<endl;
    return 0;
*/
/* 回文数 9
    quesion9 que2;
    int a=10;
    bool bb=que2.isPalindrome(a);
    cout<<bb<<endl;
*/
/* 整数反转 7
    quesion7 que3;
    int a=1200;
    cout<<que3.reverse(a)<<endl;
*/
/* 删除排序数组中的重复项
    quesion26 que26;
    vector<int> b;
    b={0,0,1,1,1,2,2,2,3,3,4};
    cout<<que26.removeDuplicates(b)<<endl;
*/
/* 罗马数转整数
    quesion13 que13;
    string s = "MCMXCIV";
    cout<<que13.romanToInt(s)<<endl;
*/
/* 移除元素
    quesion27 que27;
    vector<int> b;
    b={4,4,32,32,4,4,0,1,2,3,2,3,5,3,4};
    cout<<que27.removeElement(b,4)<<endl;
*/
/* 最长公共前缀
    quesion14 que14;
    vector<string> strs;
    strs={"aca","cba"};
    cout<<que14.longestCommonPrefix(strs)<<endl;
*/
/* 实现 strStr()
    quesion28 que28;
    string s1="aac";
    string s2="a";
    cout<<que28.strStr(s1,s2)<<endl;
*/
/* 有效的括号
    quesion20 que20;
    string s="()()()";
    cout<<que20.isValid(s)<<endl;
*/
/* 搜索插入位置
    quesion35 que35;
    vector<int> nums;
    nums={1,3,5,6};
    int a=7;
    cout<<que35.searchInsert(nums,a)<<endl;
*/
/*外观数列
    quesion38 que38;
    cout<<que38.countAndSay(6)<<endl;
*/
/* 最大子序和
    quesion53 que53;
    vector<int> nums;
    nums={-2,1,-3,4,-1,2,1,-5,4};
    cout<<que53.maxSubArray(nums)<<endl;
*/
/* 最后一个单词的长度
    quesion58 que58;
    string s="Hell osxwx";
    cout<<que58.lengthOfLastWord(s)<<endl;
*/
    quesion66 que66;
    vector<int> dig;
    vector<int> plu;
    dig={9,9,9};
    plu=que66.plusOne(dig);
    for(int i=0;i<dig.size();i++){
        cout<<plu[i]<<endl;
    }
}
